import 'dart:convert';

import 'package:FiduMart/core/network/model/base/base_model_entity.g.dart';
import 'package:FiduMart/generated/json/base/json_field.dart';



class BaseModelEntity<T> {
	@JSONField(name: "code")
	int? code;
	@JSONField(name: "data")
	T? data;
	@JSONField(name: "message")
	String? message;

	BaseModelEntity();

	factory BaseModelEntity.fromJson(Map<String, dynamic> json) => $BaseModelEntityFromJson<T>(json);

	Map<String, dynamic> toJson() => $BaseModelEntityToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}
